<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<script type="text/javascript">
	function agentPasswordCheck(){
		var community = $("#community").val();
		var buildNo = $("#buildNo").val();
		var unitNo = $("#unitNo").val();
		var roomNo = $("#roomNo").val();
		var realName = $("#realName").val();
		var password = $("#password").val();
		//获取当前窗口索引
		var index = parent.layer.getFrameIndex(window.name);
		/* parent.$("#ssqxId").val(treeNode.id);
		parent.$("#ssqxName").val(treeNode.gjqhMc); */
		//parent.layer.close(index);
		
		$.post('${ctx}/companyAdmin/agentPasswordCheck/'+community+'/'+buildNo+'/'+unitNo+'/'+roomNo+'/'+realName+'/'+password,function(data, textStatus) {
			if(textStatus == 'success') {
				if(data == 'true'){
					parent.$("#submitButton").click();
					parent.layer.close(index);
				}else{
					alert("密码输入不正确");
					return false;
				}
			}
		},"json"); 
	}
</script>
</head>
<body>

	<form id="passwordCheckform" action="" method="post">
		<input type="hidden" id="community" name="community" value="${community}"/>
		<input type="hidden" id="buildNo" name="buildNo" value="${buildNo}"/>
		<input type="hidden" id="unitNo" name="unitNo" value="${unitNo}"/>
		<input type="hidden" id="roomNo" name="roomNo" value="${roomNo}"/>
		<input type="hidden" id="realName" name="realName" value="${realName}"/>
		
		输入密码：<input type="text" id="password" name="password" value=""/>
		
		<input type="button" onclick="agentPasswordCheck()" value="验证"/>
	</form>
</body>
</html>